home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 61 / MacAddict_061_2001_09.iso / pc / Software / Communication / Ask The Web 1.1b4v2 Shareware / ask the web X 1.1b4v2 / ATW DOC / Plugin Maker Reference next >
Text File  |  2001-06-24  |  3KB  |  126 lines

  1. How to write a plugin for ASK THE WEB?
  2. ======================================
  3.  
  4. The idear of a ATW plugin is quite diffrent to the plugin technologie of Apple Sherlock! In Sherlock create a plugin by defining a start- and endpattern of each field in the webpage. When the webmaster of the search engine helps to create a plugin, than it's quite easy, because he can include in the result page secret tags. But when you don't have help like this than it could be very complicated!
  5. So ATW is using a diffrent technologie: the idear of it is to transfer the result page into a text file where the fields and records are seperated by TABs and RETURNs.
  6.  
  7. Example: The result HTML-Page (just a part of it)..............
  8.  
  9. <hr width=20%><b>Result of search for "house":</b>
  10. <pre>
  11. boarding house
  12.    pensione<p>
  13. house
  14.    casa
  15. </pre>
  16. <hr>
  17.  
  18. ......will be modified to this:
  19.  
  20. boarding house    pensione
  21. house    casa
  22.  
  23.  
  24.  
  25. To do this you have a lot of powerful tools integrated in ATW. The easiest way to create a plugin is to use the PluginMaker. With the PluginMaker you don't have to worry about the fileformat of a plugin, so I don't bother you now with this. The benefits of the PluginMaker is the integrated debugger where you can test all you plugins.
  26.  
  27.  
  28.  
  29.  
  30. Plugins Commands
  31. ================
  32.  
  33.  
  34. FIND
  35. ----
  36. Searches from the top of the page for the pattern in Value1 and stores the position of that pattern in variable X.
  37.  
  38.  
  39. XFind
  40. -----
  41. Searches from character number X of the page for the pattern in Value1 and stores the position of that pattern in variable X.
  42. This is quite helpful to find for example the first table-tag after a form-tag:
  43. FIND    <FORM
  44. XFIND    <TABLE
  45.  
  46.  
  47. REPLACE
  48. -------
  49. Replace all patterns defined in Value1 with Value2
  50.  
  51.  
  52. ReplacCharTags (Replace char tags)
  53. ----------------------------------
  54. Replaces all standart HTML-char tags to normal characters e.g.:
  55. Ö    =>    Ö
  56.  
  57.  
  58. MacOSReplace
  59. ------------
  60. Same as normal Replace but will only be executed when this plugin is installed on a MacOS computer.
  61.  
  62.  
  63. Win32Replace
  64. ------------
  65. Same as normal Replace but will only be executed when this plugin is installed on a Microsoft Windows computer.
  66.  
  67.  
  68. Remove
  69. ------
  70. Remove all pattern in the page defined in Value1.
  71.  
  72.  
  73. RemoveTAGs
  74. ----------
  75. Removes all HTML Tags.
  76.  
  77.  
  78. RemoveCRLF
  79. ----------
  80. Removes all RETURN.
  81.  
  82.  
  83. CutTop
  84. ------
  85. Removes all characters at top from postion X.
  86.  
  87.  
  88. CutBottom
  89. ---------
  90. Removes all characters at bottom from postion X.
  91.  
  92.  
  93. AddX
  94. ----
  95. Increses the variable X with Value1.
  96.  
  97.  
  98. SubX
  99. ----
  100. Decreases the variable X with Value1.
  101.  
  102.  
  103. Trim
  104. ----
  105. Remove all spaces at the top and the bottom of the page.
  106.  
  107.  
  108. MacOSDecodeText
  109. ---------------
  110. Call the MacOS-Textencoding system to decode all special characters to macintosh conform characters.
  111.  
  112.  
  113. SetFieldSeparator
  114. -----------------
  115. Replace the pattern defined in value1 with a separator. This tells ATW where the position of language1 and language2. In the moment, ATW just replaces this pattern with a TAB character (ASCII 9).
  116.  
  117.  
  118. SetEndRecord
  119. ------------
  120. Replaces the pattern defined in value1 with a End-Seperator. This tells ATW the position of the beginning of a new word. In the moment just a return character (ASCII 13).
  121.  
  122.  
  123.  
  124.  
  125.  
  126.